# --------------------------------------------------------
#  Copyright (C) 2004-2020 by EMGU Corporation. All rights reserved.
# --------------------------------------------------------

PROJECT(Example.TrafficSignRecognition)

FILE(GLOB_RECURSE SRC_Example_TrafficSignRecognition RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
LIST(APPEND SRC_Example_TrafficSignRecognition ${CMAKE_CURRENT_SOURCE_DIR}/../../CommonAssemblyInfo.cs)

#IF(TARGET_ARCH_64)
#  LIST(APPEND CS_FLAGS -platform:x64)
#ELSE()
#  LIST(APPEND CS_FLAGS -platform:x86)
#ENDIF()

LIST(APPEND CS_FLAGS ${EMGU_CV_REFERENCE})

#copy the test image for this example
ADD_CS_FILE_TO_DEPLOY(${CMAKE_CURRENT_SOURCE_DIR}/stop-sign.jpg)
ADD_CS_FILE_TO_DEPLOY(${CMAKE_CURRENT_SOURCE_DIR}/stop-sign-model.png)

COMPILE_CS(${PROJECT_NAME} "winexe" "${SRC_Example_TrafficSignRecognition}" ALL)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Emgu.CV.Examples")
ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.CV.UI)

INSTALL(FILES 
  ${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME}.${CS_EXECUTABLE_EXTENSION} 
  ${CMAKE_CURRENT_SOURCE_DIR}/stop-sign.jpg
  ${CMAKE_CURRENT_SOURCE_DIR}/stop-sign-model.png
  DESTINATION bin COMPONENT emgucv_example_binary)
